home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / borland / svgabg52.zip / SVGA64K.INC < prev    next >
Text File  |  1993-04-20  |  1KB  |  42 lines

  1. (************************************************)
  2. (*                         *)
  3. (*     SuperVGA 65536 BGI driver defines    *)
  4. (*        Copyright (c) 1993        *)
  5. (*        Jordan Hargraphix Software        *)
  6. (*                        *)
  7. (************************************************)
  8.  
  9. (* These are the currently supported modes *)
  10. const
  11.   SVGA320x200x65536    = 0;    (* 320x200x32768 HiColor VGA *)
  12.   SVGA640x350x65536    = 1;    (* 640x350x32768 HiColor VGA *)
  13.   SVGA640x400x65536    = 2;    (* 640x400x32768 HiColor VGA *)
  14.   SVGA640x480x65536    = 3;    (* 640x480x32768 HiColor VGA *)
  15.   SVGA800x600x65536    = 4;    (* 800x600x32768 HiColor VGA *)
  16.  
  17. function RGB(R,G,B : Word) : Word;
  18. begin
  19.   RGB := ((R and 31)SHL 11) OR ((G and 31)SHL 5) OR (B and 31);
  20. end;
  21.  
  22. function RealDrawColor(Color : Word) : Word;
  23. begin
  24.   if (GetMaxColor > 256) then
  25.     SetRgbPalette(1024,(Color SHR 11) AND 31,(Color SHR 5) AND 31,Color AND 31);
  26.   RealDrawColor := Color;
  27. end;
  28.  
  29. function RealFillColor(Color : Word) : Word;
  30. begin
  31.   if (GetMaxColor > 256) then
  32.     SetRgbPalette(1025,(Color SHR 11) AND 31,(Color SHR 5)AND 31,Color AND 31);
  33.   RealFillColor := Color;
  34. end;
  35.  
  36. function RealColor(Color : Word) : Word;
  37. begin
  38.   if (GetMaxColor > 256) then
  39.     SetRgbPalette(1026,(Color SHR 10) AND 31,(Color SHR 5)AND 31,Color AND 31);
  40.   RealColor := Color;
  41. end;
  42.